void UART_Write_Blocking(usart_type* usart_x, uint8_t* data,uint16_t size)
{
	uint16_t i=0;
	while(usart_flag_get(usart_x, USART_TDBE_FLAG) == RESET);
	usart_flag_clear(usart_x, USART_TDBE_FLAG);
	for(i=0;i<size;i++)
	{
		usart_data_transmit(usart_x, (uint16_t)data[i]);
		while(usart_flag_get(usart_x, USART_TDC_FLAG) == RESET);
		usart_flag_clear(usart_x,USART_TDC_FLAG);
	}
}

